{% extends "admin/layout.html" %}

{% block content %}
    <h1 style="margin-top: 30px">产品表单</h1>
    <div style="margin-top: 30px;">
        <form action="/admin_product" method="post">
            <p>产品编号</p>
            <input readonly="readonly" style="width: 250px" type="text" name="id"
                   value="{{ product.id if product is defined else '' }}">
            <br/>
            <br/>

            <p>产品名称</p>
            <input style="width: 250px" type="text" name="name"
                   value="{{ product.name if product is defined else '' }}">
            <br/>
            <br/>

            <p>产品全称</p>
            <input style="width: 250px" type="text" name="eName"
                   value="{{ product.eName if product is defined else '' }}">
            <br/>
            <br/>

            <p>所属企业名称</p>
            <input style="width: 250px" type="text" name="firmName"
                   value="{{ product.firmName if product is defined else '' }}">
            <br/>
            <br/>

            <p>企业网址</p>
            <input style="width: 250px" type="text" name="firmUrl"
                   value="{{ product.frimUrl if product is defined else '' }}">
            <br/>
            <br/>

            <p>分类Tags</p>
            <input style="width: 250px" type="text" name="categoryTags"
                   value="{{ product.categoryTags if product is defined else '' }}">
            <br/>
            <br/>

            <p>功能Tags</p>
            <input style="width: 250px" type="text" name="featureTags"
                   value="{{ product.featureTags if product is defined else '' }}">
            <br/>
            <br/>

            <p>logoUrl</p>
            <input style="width: 250px" type="text" name="logo"
                   value="{{ product.logo if product is defined else '' }}">
            <br/>
            <br/>

            <p>pageUrl</p>
            <input style="width: 250px" type="text" name="pageUrl"
                   value="{{ product.pageUrl if product is defined else '' }}">
            <br/>
            <br/>

            <p>说明</p>
            <textarea cols="80" rows="10"
                      name="captionHtml">{{ product.captionHtml if product is defined else '' }}</textarea>
            <br/>
            <br/>

            <p>简介</p>
            <textarea cols="80" rows="10"
                      name="introHtml">{{ product.introHtml if product is defined else '' }}</textarea>
            <br/>
            <br/>

            <p>详情Html</p>
            <script type="text/plain" id="editor">
                {{ product.detailHtml|safe if product is defined else '' }}
            </script>
            <br/>
            <br/>

            <input type="submit" value="确定">
        </form>
    </div>
    <script type="text/javascript">
        //var editor = new UE.ui.Editor();
        //editor.render("myEditor");
        //1.2.4以后可以使用一下代码实例化编辑器
        UE.getEditor('editor')
    </script>
{% endblock %}